package com.xzr.demo.service;

import com.xzr.demo.entity.Userinfo;
import com.xzr.demo.mapper.UserMapper;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：徐志荣
 * @Date：2023/6/20 上午 9:41
 */

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public Userinfo getUserById(Integer id ){
        return userMapper.getUserById(id);
    }

    public List<Userinfo> getAll(){
        return  userMapper.getAll();
    }

    public int add(Userinfo userinfo){
        return userMapper.add(userinfo);
    }

}
